package com.ncsc.erp.model;
// Generated 20 มิ.ย. 2557, 12:55:43 by Hibernate Tools 3.4.0.CR1


import java.math.BigDecimal;
import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * MmLocation generated by hbm2java
 */
@Entity
@Table(name="mm_location"
    ,catalog="ncsc_erp"
)
public class MmLocation  implements java.io.Serializable {


     private long lctNo;
     private SysUom sysUomByLctDimUomNo;
     private SysUom sysUomByLctAreaSizeUomNo;
     private MmLocationLevel mmLocationLevel;
     private Integer lctLevelTypeNo;
     private String lctCode;
     private int lctSeqNo;
     private String lctDescr;
     private BigDecimal lctAreaSize;
     private BigDecimal lctWidth;
     private BigDecimal lctLength;
     private BigDecimal lctHeight;
     private Date lctEffectiveDate;
     private Date lctExpireDate;
     private Short lctStatusNo;
     private Set<MmLocationSub> mmLocationSubsForSubLctNo = new HashSet<MmLocationSub>(0);
     private Set<MmLocationSub> mmLocationSubsForLctNo = new HashSet<MmLocationSub>(0);

    public MmLocation() {
    }

	
    public MmLocation(long lctNo, int lctSeqNo, BigDecimal lctAreaSize, BigDecimal lctWidth, BigDecimal lctLength, BigDecimal lctHeight) {
        this.lctNo = lctNo;
        this.lctSeqNo = lctSeqNo;
        this.lctAreaSize = lctAreaSize;
        this.lctWidth = lctWidth;
        this.lctLength = lctLength;
        this.lctHeight = lctHeight;
    }
    public MmLocation(long lctNo, SysUom sysUomByLctDimUomNo, SysUom sysUomByLctAreaSizeUomNo, MmLocationLevel mmLocationLevel, Integer lctLevelTypeNo, String lctCode, int lctSeqNo, String lctDescr, BigDecimal lctAreaSize, BigDecimal lctWidth, BigDecimal lctLength, BigDecimal lctHeight, Date lctEffectiveDate, Date lctExpireDate, Short lctStatusNo, Set<MmLocationSub> mmLocationSubsForSubLctNo, Set<MmLocationSub> mmLocationSubsForLctNo) {
       this.lctNo = lctNo;
       this.sysUomByLctDimUomNo = sysUomByLctDimUomNo;
       this.sysUomByLctAreaSizeUomNo = sysUomByLctAreaSizeUomNo;
       this.mmLocationLevel = mmLocationLevel;
       this.lctLevelTypeNo = lctLevelTypeNo;
       this.lctCode = lctCode;
       this.lctSeqNo = lctSeqNo;
       this.lctDescr = lctDescr;
       this.lctAreaSize = lctAreaSize;
       this.lctWidth = lctWidth;
       this.lctLength = lctLength;
       this.lctHeight = lctHeight;
       this.lctEffectiveDate = lctEffectiveDate;
       this.lctExpireDate = lctExpireDate;
       this.lctStatusNo = lctStatusNo;
       this.mmLocationSubsForSubLctNo = mmLocationSubsForSubLctNo;
       this.mmLocationSubsForLctNo = mmLocationSubsForLctNo;
    }
   
     @Id 

    
    @Column(name="LCT_NO", unique=true, nullable=false)
    public long getLctNo() {
        return this.lctNo;
    }
    
    public void setLctNo(long lctNo) {
        this.lctNo = lctNo;
    }

@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="LCT_DIM_UOM_NO")
    public SysUom getSysUomByLctDimUomNo() {
        return this.sysUomByLctDimUomNo;
    }
    
    public void setSysUomByLctDimUomNo(SysUom sysUomByLctDimUomNo) {
        this.sysUomByLctDimUomNo = sysUomByLctDimUomNo;
    }

@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="LCT_AREA_SIZE_UOM_NO")
    public SysUom getSysUomByLctAreaSizeUomNo() {
        return this.sysUomByLctAreaSizeUomNo;
    }
    
    public void setSysUomByLctAreaSizeUomNo(SysUom sysUomByLctAreaSizeUomNo) {
        this.sysUomByLctAreaSizeUomNo = sysUomByLctAreaSizeUomNo;
    }

@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="LCT_LEVEL_NO")
    public MmLocationLevel getMmLocationLevel() {
        return this.mmLocationLevel;
    }
    
    public void setMmLocationLevel(MmLocationLevel mmLocationLevel) {
        this.mmLocationLevel = mmLocationLevel;
    }

    
    @Column(name="LCT_LEVEL_TYPE_NO")
    public Integer getLctLevelTypeNo() {
        return this.lctLevelTypeNo;
    }
    
    public void setLctLevelTypeNo(Integer lctLevelTypeNo) {
        this.lctLevelTypeNo = lctLevelTypeNo;
    }

    
    @Column(name="LCT_CODE", length=50)
    public String getLctCode() {
        return this.lctCode;
    }
    
    public void setLctCode(String lctCode) {
        this.lctCode = lctCode;
    }

    
    @Column(name="LCT_SEQ_NO", nullable=false)
    public int getLctSeqNo() {
        return this.lctSeqNo;
    }
    
    public void setLctSeqNo(int lctSeqNo) {
        this.lctSeqNo = lctSeqNo;
    }

    
    @Column(name="LCT_DESCR", length=300)
    public String getLctDescr() {
        return this.lctDescr;
    }
    
    public void setLctDescr(String lctDescr) {
        this.lctDescr = lctDescr;
    }

    
    @Column(name="LCT_AREA_SIZE", nullable=false, precision=15)
    public BigDecimal getLctAreaSize() {
        return this.lctAreaSize;
    }
    
    public void setLctAreaSize(BigDecimal lctAreaSize) {
        this.lctAreaSize = lctAreaSize;
    }

    
    @Column(name="LCT_WIDTH", nullable=false, precision=15)
    public BigDecimal getLctWidth() {
        return this.lctWidth;
    }
    
    public void setLctWidth(BigDecimal lctWidth) {
        this.lctWidth = lctWidth;
    }

    
    @Column(name="LCT_LENGTH", nullable=false, precision=15)
    public BigDecimal getLctLength() {
        return this.lctLength;
    }
    
    public void setLctLength(BigDecimal lctLength) {
        this.lctLength = lctLength;
    }

    
    @Column(name="LCT_HEIGHT", nullable=false, precision=15)
    public BigDecimal getLctHeight() {
        return this.lctHeight;
    }
    
    public void setLctHeight(BigDecimal lctHeight) {
        this.lctHeight = lctHeight;
    }

    @Temporal(TemporalType.DATE)
    @Column(name="LCT_EFFECTIVE_DATE", length=10)
    public Date getLctEffectiveDate() {
        return this.lctEffectiveDate;
    }
    
    public void setLctEffectiveDate(Date lctEffectiveDate) {
        this.lctEffectiveDate = lctEffectiveDate;
    }

    @Temporal(TemporalType.DATE)
    @Column(name="LCT_EXPIRE_DATE", length=10)
    public Date getLctExpireDate() {
        return this.lctExpireDate;
    }
    
    public void setLctExpireDate(Date lctExpireDate) {
        this.lctExpireDate = lctExpireDate;
    }

    
    @Column(name="LCT_STATUS_NO")
    public Short getLctStatusNo() {
        return this.lctStatusNo;
    }
    
    public void setLctStatusNo(Short lctStatusNo) {
        this.lctStatusNo = lctStatusNo;
    }

@OneToMany(fetch=FetchType.LAZY, mappedBy="mmLocationBySubLctNo")
    public Set<MmLocationSub> getMmLocationSubsForSubLctNo() {
        return this.mmLocationSubsForSubLctNo;
    }
    
    public void setMmLocationSubsForSubLctNo(Set<MmLocationSub> mmLocationSubsForSubLctNo) {
        this.mmLocationSubsForSubLctNo = mmLocationSubsForSubLctNo;
    }

@OneToMany(fetch=FetchType.LAZY, mappedBy="mmLocationByLctNo")
    public Set<MmLocationSub> getMmLocationSubsForLctNo() {
        return this.mmLocationSubsForLctNo;
    }
    
    public void setMmLocationSubsForLctNo(Set<MmLocationSub> mmLocationSubsForLctNo) {
        this.mmLocationSubsForLctNo = mmLocationSubsForLctNo;
    }




}


